try:
    from ulab import numpy as np
except ImportError:
    import numpy as np

print("Array creation using ARRAY:")
print(np.array(np.array(range(5), dtype=np.uint8), dtype=np.uint8))
print(np.array(np.array(range(5), dtype=np.uint8), dtype=np.int8))
print(np.array(np.array(range(5), dtype=np.uint8), dtype=np.uint16))
print(np.array(np.array(range(5), dtype=np.uint8), dtype=np.int16))
print(np.array(np.array(range(5), dtype=np.uint8), dtype=np.float))
print(np.array(np.array(range(5), dtype=np.int8), dtype=np.uint8))
print(np.array(np.array(range(5), dtype=np.int8), dtype=np.int8))
print(np.array(np.array(range(5), dtype=np.int8), dtype=np.uint16))
print(np.array(np.array(range(5), dtype=np.int8), dtype=np.int16))
print(np.array(np.array(range(5), dtype=np.int8), dtype=np.float))
print(np.array(np.array(range(5), dtype=np.uint16), dtype=np.uint8))
print(np.array(np.array(range(5), dtype=np.uint16), dtype=np.int8))
print(np.array(np.array(range(5), dtype=np.uint16), dtype=np.uint16))
print(np.array(np.array(range(5), dtype=np.uint16), dtype=np.int16))
print(np.array(np.array(range(5), dtype=np.uint16), dtype=np.float))
print(np.array(np.array(range(5), dtype=np.int16), dtype=np.uint8))
print(np.array(np.array(range(5), dtype=np.int16), dtype=np.int8))
print(np.array(np.array(range(5), dtype=np.int16), dtype=np.uint16))
print(np.array(np.array(range(5), dtype=np.int16), dtype=np.int16))
print(np.array(np.array(range(5), dtype=np.int16), dtype=np.float))
print(np.array(np.array(range(5), dtype=np.float), dtype=np.uint8))
print(np.array(np.array(range(5), dtype=np.float), dtype=np.int8))
print(np.array(np.array(range(5), dtype=np.float), dtype=np.uint16))
print(np.array(np.array(range(5), dtype=np.float), dtype=np.int16))
print(np.array(np.array(range(5), dtype=np.float), dtype=np.float))
print("Array creation using ARANGE:")
print(np.arange(10))
print(np.arange(2, 10))
print(np.arange(2, 10, 3))
print(np.arange(2, 10, 3, dtype=np.float))
print("Array concatenation:")
a = np.array([1,2,3], dtype=np.float)
b = np.array([4,5,6], dtype=np.float)
print(np.concatenate((a,b)))
print(np.concatenate((a,b), axis=0))
a = np.array([[1,2,3],[4,5,6],[7,8,9]], dtype=np.float)
b = np.array([[1,2,3],[4,5,6],[7,8,9]], dtype=np.float)
print(np.concatenate((a,b), axis=0))
print(np.concatenate((a,b), axis=1))
print(np.concatenate((b,a), axis=0))
print(np.concatenate((b,a), axis=1))
print("Identity array creation:")
print(np.eye(3))
print(np.eye(3, M=4))
print(np.eye(3, M=4, k=0))
print(np.eye(3, M=4, k=-1))
print(np.eye(3, M=4, k=-2))
print(np.eye(3, M=4, k=-3))
print(np.eye(3, M=4, k=1))
print(np.eye(3, M=4, k=2))
print(np.eye(3, M=4, k=3))
print(np.eye(4, M=4))
print(np.eye(4, M=3, k=0))
print(np.eye(4, M=3, k=-1))
print(np.eye(4, M=3, k=-2))
print(np.eye(4, M=3, k=-3))
print(np.eye(4, M=3, k=1))
print(np.eye(4, M=3, k=2))
print(np.eye(4, M=3, k=3))
print("Array creation using FULL:")
print(np.full((2, 4), 3, dtype=np.float))
print(np.full((2, 4), 3, dtype=np.uint8))
print("Array creation using LINSPACE:")
print(np.linspace(0, 10, num=5))
print(np.linspace(0, 10, num=5, endpoint=False))
print(np.linspace(0, 10, num=5, endpoint=True))
print(np.linspace(0, 10, num=5, endpoint=False, dtype=np.uint8))
print(np.linspace(0, 10, num=5, endpoint=False, dtype=np.uint16))
print(np.linspace(0, 10, num=5, endpoint=False, dtype=np.int8))
print(np.linspace(0, 10, num=5, endpoint=False, dtype=np.int16))
print("Array creation using LOGSPACE:")
print(np.logspace(0, 10, num=5))
print(np.logspace(0, 10, num=5, endpoint=False))
print(np.logspace(0, 10, num=5, endpoint=True))
print(np.logspace(0, 10, num=5, endpoint=False, dtype=np.uint8))
print(np.logspace(0, 10, num=5, endpoint=False, dtype=np.uint16))
print(np.logspace(0, 10, num=5, endpoint=False, dtype=np.int8))
print(np.logspace(0, 10, num=5, endpoint=False, dtype=np.int16))
print("Array creation using ZEROS:")
print(np.zeros(3))
print(np.zeros((3,3)))
print(np.zeros((3,3), dtype=np.uint8))
print(np.zeros((3,3), dtype=np.uint16))
print(np.zeros((3,3), dtype=np.int8))
print(np.zeros((3,3), dtype=np.int16))
print(np.zeros((4,3), dtype=np.float))
print(np.zeros((3,4), dtype=np.float))
print("Array creation using ONES:")
print(np.ones(3))
print(np.ones((3,3)))
print(np.ones((3,3), dtype=np.uint8))
print(np.ones((3,3), dtype=np.uint16))
print(np.ones((3,3), dtype=np.int8))
print(np.ones((3,3), dtype=np.int16))
print(np.ones((4,3), dtype=np.float))
print(np.ones((3,4), dtype=np.float))
